# 下载node_exporter部署包，github地址：https://github.com/prometheus/node_exporter?spm=5176.28103460.0.0.64af451eeGehbj


# 解包
tar -xf node_exporter-1.4.0.linux-amd64.tar.gz -C /usr/local
cd /usr/local && mv node_exporter-1.4.0.linux-amd64 node_exporter


# 使用systemctl启动node_exporter
cat > /etc/systemd/system/node_exporter-9100.service << EOF
[Unit]
Descriptinotallow=node_exporter
Documentatinotallow=https://prometheus.io/
After=network-online.target

[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/local/node_exporter/node_exporter --web.listen-address=:9100
Restart=on-failure
EOF


systemctl daemon-reload
systemctl start node_exporter-9100.service 